<div kendo-window="createTemplateFromRootVolume__" k-options="createTemplateFromRootVolumeOptions__" k-visible="false">
    <div>
        <div class="alert alert-warning col-sm-21" ng-show="!hasBackupStorage()">
            {{ "volume.createTemplateFromVolume.ALERT1.1" | translate }}<a href="/#/backupStorage">{{ "volume.createTemplateFromVolume.ALERT1.2" | translate }}</a>{{ "volume.createTemplateFromVolume.ALERT1.3" | translate }}
            Or please attach an existing backup storage to the zone this root volume belongs to.
        </div>

        <h4 class="z-win-h4">{{ "volume.createTemplateFromVolume.CREATE TEMPLATE FROM ROOT VOLUME" | translate }}</h4>
        <div class="alert alert-warning col-sm-21" ng-show="!isVmInCorrectState()">
            {{ "volume.createTemplateFromVolume.ALERT2.1" | translate }}<a herf="/#/vmInstance/{{vm.uuid}}">{{vm.name}}</a>{{ "volume.createTemplateFromVolume.ALERT2.2" | translate }}{{vm.state}}{{ "volume.createTemplateFromVolume.ALERT2.3" | translate }}
            
        </div>
        <form class="form">
            <div class="form-group col-sm-18">
                <label for="ps">{{ "volume.createTemplateFromVolume.BACKUP STORAGE" | translate }}</label>
                <select id="ps" kendo-drop-down-list="backupStorageList__" k-options="backupStorageOptions__" class="z-win-dropdown" ng-model="bsUuid"></select>
            </div>
            <div class="form-group col-sm-18">
                <label for="name">{{ "volume.createTemplateFromVolume.NAME" | translate }}</label>
                <input class="form-control" type="text" id="name" placeholder="(Required) max length of 255 characters" ng-model="name" required data-message="name is required">
            </div>
            <div class="form-group col-sm-18">
                <label for="description">{{ "volume.createTemplateFromVolume.DESCRIPTION" | translate }}</label>
                <textarea  class="form-control" rows="5" id="description" placeholder="(Optional) max length of 2048 characters" ng-model="description"></textarea>
            </div>
            <div class="form-group col-sm-18">
                <label for="hvType">{{ "volume.createTemplateFromVolume.PLATFORM" | translate }}</label>
                <select id="hvType" kendo-drop-down-list="platformList__" k-options="platformOptions__" class="z-win-dropdown" ng-model="platform"></select>
            </div>
            <div class="form-group col-sm-18">
                <label for="bits">{{ "volume.createTemplateFromVolume.BITS" | translate }}</label>
                <select id="bits" kendo-drop-down-list="bitsList__" k-options="bitsOptions__" class="z-win-dropdown" ng-model="bits"></select>
                <p class="z-hint">{{ "volume.createTemplateFromVolume.HINT1" | translate }}</p>
            </div>
            <div class="form-group col-sm-18">
                <label for="guestOsType">{{ "volume.createTemplateFromVolume.GUEST OS TYPE" | translate }}</label>
                <input type="text" class="form-control" id="guestOsType" placeholder="guest os type" ng-model="guestOsType">
            </div>

            <div class="form-group col-sm-18">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" ng-model="system"> <strong>{{ "volume.createTemplateFromVolume.SYSTEM TEMPLATE" | translate }}</strong>
                    </label>
                </div>
                <p class="z-hint">{{ "volume.createTemplateFromVolume.HINT2" | translate }}</p>
            </div>

            <div class="form-group col-lg-18">
                <button type="button" class="btn btn-default" ng-click="cancel()">{{ "volume.createTemplateFromVolume.Cancel" | translate }}</button>
                <button type="button" class="btn btn-primary" ng-disabled="!canProceed()" ng-click="done()">{{ "volume.createTemplateFromVolume.Create" | translate }}</button>
            </div>
        </form>
    </div>
</div>
